home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / nrpas13.arc / BESSK0.PAS < prev    next >
Pascal/Delphi Source File  |  1991-05-01  |  518b  |  17 lines

  1. FUNCTION bessk0(x: real): real;
  2. VAR
  3.    y,ans: double;
  4. BEGIN
  5.    IF (x <= 2.0) THEN BEGIN
  6.       y := x*x/4.0;
  7.       ans := (-ln(x/2.0)*bessi0(x))+(-0.57721566+y*(0.42278420
  8.          +y*(0.23069756+y*(0.3488590e-1+y*(0.262698e-2
  9.          +y*(0.10750e-3+y*0.74e-5))))))  END
  10.    ELSE BEGIN
  11.       y := (2.0/x);
  12.       ans := (exp(-x)/sqrt(x))*(1.25331414+y*(-0.7832358e-1
  13.          +y*(0.2189568e-1+y*(-0.1062446e-1+y*(0.587872e-2
  14.          +y*(-0.251540e-2+y*0.53208e-3))))))  END;
  15.    bessk0 := sngl(ans)
  16. END;
  17.